<?php

class MgameGroup extends AppModel {

    var $alias = 'MgameGroup';
    var $name = 'MgameGroup';
    var $useTable = 'mgame_group';
    var $hasMany = array(
        'Mgame' => array(
            'className' => 'Mgame',
            'foreignKey' => 'group_id',
            'fields' => array('Mgame.id', 'Mgame.title', 'Mgame.alias')
        )
    );

    function getListAll() {
        $data = $this->find('list', array(
                    'fields' => 'MgameGroup.id, MgameGroup.title',
                ));
        return $data;
    }    
}

?>
